package com.zxd.enums;

/**
 * ClassName:AbsstractEnum
 * Package:com.zxd.enums
 *
 * @Date:2023/9/21 16:45
 * @Author:zxde
 */
public enum AbstractEnum {

    //枚举对象名字必须要放在第一行
    X("张三") {
        @Override
        public void method1() {
            System.out.println(this.name);
        }
    };
    String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    AbstractEnum(String name) {
        this.name = name;
    }

    public abstract void method1();
    }
